<md-card>

    <div>
        <img alt="{{shop.data.name}}" ng-src-cache="{{shop.data.front.id | mediaScreen}}">
    </div>
                
    <md-card-content>
        <div layout layout-padding class="front-title">
            <div>
                <h1>{{shop.data.name}}</h1>
            </div>
            <div>@{{shop.data.login}}</div>
        </div>
               
        <div layout layout-align="start center" layout-padding class="reporting">

            <md-button ng-if="shop.data.contact.tel" ng-href="tel:{{shop.data.contact.tel}}" aria-label="Tel" class="md-accent">
                <md-icon md-svg-src="/assets/icons/pink/phone.svg" class="md-medium"></md-icon>
                <span>{{shop.data.contact.tel}}</span>
            </md-button>

            <span flex></span>
                    
            <div layout-padding>
                <md-icon md-svg-src="/assets/icons/grey/envelope-square.svg" class="md-medium"></md-icon>
                <span>{{shop.data.alerts.total}}</span>
            </div>
            <div layout-padding>|</div>
            <div layout-padding>
                <md-icon md-svg-src="/assets/icons/grey/user.svg" class="md-medium"></md-icon>
                <span>{{shop.data.users.subscribers.total}}</span>
            </div>
        </div>

        <div layout layout-align="start center" vmargin ng-bind-html="shop.data.description | linkify"></div>

        <div layout layout-align="end end">
            <md-button ng-click="shop.subscribeUser()" aria-label="Subscribe" class="md-accent">
                <md-icon md-svg-src="/assets/icons/pink/heart-o.svg" class="md-medium"></md-icon>
            </md-button>
        </div>
                
    </md-card-content>
            
</md-card>

<div infinite-scroll="shopAlerts.paging()" items="shopAlerts.items" skip="shopAlerts.skip" max-bottom="0">
    <div ng-repeat="item in shopAlerts.items">
        <md-subheader>{{item.key | literalDate}}</md-subheader>
        <div ng-repeat="alert in item.values track by alert.data._id" ng-include="'app/partials/common/alert-item-content.html'"></div>
    </div>
</div>